package com.hs.jhzd.service.task;

import java.util.HashMap;
import java.util.Map;
import com.hs.jhzd.entity.SystemNotice;
import com.hs.jhzd.service.message.NoticeProducer;
import com.hs.jhzd.service.message.RoutingkeyEnums;
import lombok.Data;

@Data
public class RollcallTask implements Runnable {

  private NoticeProducer noticeProducer;


  @Override
  public void run() {
    SystemNotice systemNotice = new SystemNotice();
    Map<String, Object> param = new HashMap<>();
    param.put("limitedTime", 10);// 限制10分钟内点完
    systemNotice.setOrder(SystemNotice.ORDER_ROLLCALL);
    systemNotice.setParam(param);
    noticeProducer.sendMessage(RoutingkeyEnums.TERMINAL_ALL.getName(), systemNotice);
    noticeProducer.sendMessage(RoutingkeyEnums.CLIENT.getName(), systemNotice);

  }

}

